package com.lzh.sms.props;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.time.Duration;

/**
 * @author zhehen.lu
 * @date 2025/8/14 17:03
 */
@ConfigurationProperties("aliyun.sms")
public class AliYunSMSProperty extends ALiYunCoreProperty {

    /**
     * 节点信息（默认不填）
     */
    private String endPoint = "cn-hangzhou";

    /**
     * 产品名称
     */
    private String product = "Dysmsapi";

    /**
     * 域名路径
     */
    private String domainUrl = "dysmsapi.aliyuncs.com";

    /**
     * 连接过期时间
     */
    private Duration connectionTimeout = Duration.ofSeconds(10);

    /**
     * 读取过期时间
     */
    private Duration readTimeout = Duration.ofSeconds(10);

    public String getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getDomainUrl() {
        return domainUrl;
    }

    public void setDomainUrl(String domainUrl) {
        this.domainUrl = domainUrl;
    }

    public Duration getConnectionTimeout() {
        return connectionTimeout;
    }

    public void setConnectionTimeout(Duration connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    public Duration getReadTimeout() {
        return readTimeout;
    }

    public void setReadTimeout(Duration readTimeout) {
        this.readTimeout = readTimeout;
    }

    @Override
    public String toString() {
        return "AliYunSMSProperty [endPoint=" + endPoint + ", product=" + product + ", domainUrl=" + domainUrl
                + ", connectionTimeout=" + connectionTimeout + ", readTimeout=" + readTimeout + ", regionId=" + regionId
                + ", accessKeyId=" + accessKeyId + ", secret=" + secret + "]";
    }
}
